﻿using UnityEngine;
using System.Collections;

public class Basics2 : MonoBehaviour
{
	// Update is called once per frame
	void Update()
	{
		if (Network.isServer)
		{
			//Only the server can move the cube!
			Vector3 moveDirection = new Vector3( Input.GetAxis("Horizontal"),
				0.0f,Input.GetAxis("Vertical"));
			float speed = 10;
			transform.Translate(speed * moveDirection * Time.deltaTime);
		}
	}
}